using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._WorkflowManagerTools._Configuration
{
    /// <summary>
    /// <para>Create Workflow Database</para>
    /// <para>Creates Workflow Manager (Classic) schema and configures an enterprise geodatabase as the Workflow Manager (Classic) database.</para>
    /// <para>创建 Workflow Manager （Classic） 方案并将企业级地理数据库配置为 Workflow Manager （Classic） 数据库。</para>
    /// </summary>    
    [DisplayName("Create Workflow Database")]
    public class CreateWorkflowDatabase : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateWorkflowDatabase()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_Input_Database_Connection">
        /// <para>Input Database Connection</para>
        /// <para>The location of the enterprise geodatabase connection file that will host the Workflow Manager (Classic) schema and configuration. The connection file must connect directly to the database, and the connection should be made as a database owner.</para>
        /// <para>将承载 Workflow Manager （Classic） 方案和配置的企业级地理数据库连接文件的位置。连接文件必须直接连接到数据库，并且应以数据库所有者的身份进行连接。</para>
        /// </param>
        /// <param name="_AOI_Spatial_Reference">
        /// <para>AOI Spatial Reference</para>
        /// <para><xdoc>
        ///   <para>The spatial reference of the AOI feature class. You can specify the spatial reference in the following ways:
        ///   <bulletList>
        ///     <bullet_item>Select a spatial reference.  </bullet_item><para/>
        ///     <bullet_item>Select a feature class or feature dataset whose spatial reference you want to apply.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>AOI 要素类的空间参考。可以通过以下方式指定空间参考：
        ///   <bulletList>
        ///     <bullet_item>选取空间参考。</bullet_item><para/>
        ///     <bullet_item>选择要应用其空间参考的要素类或要素数据集。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_Import_Configuration">
        /// <para>Import Configuration</para>
        /// <para><xdoc>
        ///   <para>Specifies the Workflow Manager (Classic) elements to be imported into the new Workflow Manager (Classic) database. The default is Minimum configuration (Minimum Configuration in Python).</para>
        ///   <bulletList>
        ///     <bullet_item>Minimum configuration—Imports the basic elements that the Workflow Manager (Classic) system requires.</bullet_item><para/>
        ///     <bullet_item>Quick configuration—Includes the Minimum Configuration elements plus samples for several elements.</bullet_item><para/>
        ///     <bullet_item>Custom configuration—Specifies a Workflow Manager (Classic) configuration file in the Input Custom Configuration parameter, exported from a preexisting database.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要导入到新 Workflow Manager （Classic） 数据库中的 Workflow Manager （Classic） 元素。默认值为“最低配置”（Python 中的“最低配置”）。</para>
        ///   <bulletList>
        ///     <bullet_item>最低配置 - 导入 Workflow Manager （Classic） 系统所需的基本元素。</bullet_item><para/>
        ///     <bullet_item>快速配置 - 包括“最低配置”元素以及多个元素的示例。</bullet_item><para/>
        ///     <bullet_item>自定义配置 - 在输入自定义配置参数中指定从预先存在的数据库导出的 Workflow Manager （Classic） 配置文件。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public CreateWorkflowDatabase(object _Input_Database_Connection, object _AOI_Spatial_Reference, _Import_Configuration_value? _Import_Configuration)
        {
            this._Input_Database_Connection = _Input_Database_Connection;
            this._AOI_Spatial_Reference = _AOI_Spatial_Reference;
            this._Import_Configuration = _Import_Configuration;
        }
        public override string ToolboxName => "Workflow Manager Tools";

        public override string ToolName => "Create Workflow Database";

        public override string CallName => "wmx.CreateWorkflowDatabase";

        public override List<string> AcceptEnvironments => ["configKeyword"];

        public override object[] ParameterInfo => [_Input_Database_Connection, _AOI_Spatial_Reference, _Import_Configuration.GetGPValue(), _Input_Custom_Configuration, _User_Store.GetGPValue(), _Output_DatabasePath];

        /// <summary>
        /// <para>Input Database Connection</para>
        /// <para>The location of the enterprise geodatabase connection file that will host the Workflow Manager (Classic) schema and configuration. The connection file must connect directly to the database, and the connection should be made as a database owner.</para>
        /// <para>将承载 Workflow Manager （Classic） 方案和配置的企业级地理数据库连接文件的位置。连接文件必须直接连接到数据库，并且应以数据库所有者的身份进行连接。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Database Connection")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Input_Database_Connection { get; set; }


        /// <summary>
        /// <para>AOI Spatial Reference</para>
        /// <para><xdoc>
        ///   <para>The spatial reference of the AOI feature class. You can specify the spatial reference in the following ways:
        ///   <bulletList>
        ///     <bullet_item>Select a spatial reference.  </bullet_item><para/>
        ///     <bullet_item>Select a feature class or feature dataset whose spatial reference you want to apply.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>AOI 要素类的空间参考。可以通过以下方式指定空间参考：
        ///   <bulletList>
        ///     <bullet_item>选取空间参考。</bullet_item><para/>
        ///     <bullet_item>选择要应用其空间参考的要素类或要素数据集。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("AOI Spatial Reference")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _AOI_Spatial_Reference { get; set; }


        /// <summary>
        /// <para>Import Configuration</para>
        /// <para><xdoc>
        ///   <para>Specifies the Workflow Manager (Classic) elements to be imported into the new Workflow Manager (Classic) database. The default is Minimum configuration (Minimum Configuration in Python).</para>
        ///   <bulletList>
        ///     <bullet_item>Minimum configuration—Imports the basic elements that the Workflow Manager (Classic) system requires.</bullet_item><para/>
        ///     <bullet_item>Quick configuration—Includes the Minimum Configuration elements plus samples for several elements.</bullet_item><para/>
        ///     <bullet_item>Custom configuration—Specifies a Workflow Manager (Classic) configuration file in the Input Custom Configuration parameter, exported from a preexisting database.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要导入到新 Workflow Manager （Classic） 数据库中的 Workflow Manager （Classic） 元素。默认值为“最低配置”（Python 中的“最低配置”）。</para>
        ///   <bulletList>
        ///     <bullet_item>最低配置 - 导入 Workflow Manager （Classic） 系统所需的基本元素。</bullet_item><para/>
        ///     <bullet_item>快速配置 - 包括“最低配置”元素以及多个元素的示例。</bullet_item><para/>
        ///     <bullet_item>自定义配置 - 在输入自定义配置参数中指定从预先存在的数据库导出的 Workflow Manager （Classic） 配置文件。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Import Configuration")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _Import_Configuration_value? _Import_Configuration { get; set; }

        public enum _Import_Configuration_value
        {
            /// <summary>
            /// <para>Minimum configuration</para>
            /// <para>Minimum configuration—Imports the basic elements that the Workflow Manager (Classic) system requires.</para>
            /// <para>最低配置 - 导入 Workflow Manager （Classic） 系统所需的基本元素。</para>
            /// </summary>
            [Description("Minimum configuration")]
            [GPEnumValue("Minimum Configuration")]
            _Minimum_Configuration,

            /// <summary>
            /// <para>Quick configuration</para>
            /// <para>Quick configuration—Includes the Minimum Configuration elements plus samples for several elements.</para>
            /// <para>快速配置 - 包括“最低配置”元素以及多个元素的示例。</para>
            /// </summary>
            [Description("Quick configuration")]
            [GPEnumValue("Quick Configuration")]
            _Quick_Configuration,

            /// <summary>
            /// <para>Custom configuration</para>
            /// <para>Custom configuration—Specifies a Workflow Manager (Classic) configuration file in the Input Custom Configuration parameter, exported from a preexisting database.</para>
            /// <para>自定义配置 - 在输入自定义配置参数中指定从预先存在的数据库导出的 Workflow Manager （Classic） 配置文件。</para>
            /// </summary>
            [Description("Custom configuration")]
            [GPEnumValue("Custom Configuration")]
            _Custom_Configuration,

        }

        /// <summary>
        /// <para>Input Custom Configuration</para>
        /// <para>A custom configuration file that was exported from an existing Workflow Manager (Classic) database.</para>
        /// <para>从现有 Workflow Manager （Classic） 数据库导出的自定义配置文件。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Custom Configuration")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _Input_Custom_Configuration { get; set; } = null;


        /// <summary>
        /// <para>User Store</para>
        /// <para><xdoc>
        ///   <para>Specifies the user store from which the users and roles will be retrieved. The users can be imported from a portal and are assigned to roles created in the Workflow Manager (Classic) repository. The portal user profile information cannot be edited using ArcGIS Workflow Manager (Classic) Administrator. The users and roles can be created in the Workflow Manager (Classic) repository using the Traditional option. When using the Traditional option, the users and roles can be imported from the Active Directory in ArcGIS Workflow Manager (Classic) Administrator.</para>
        ///   <bulletList>
        ///     <bullet_item>Portal—The users will be imported from the portal you are currently signed in to.</bullet_item><para/>
        ///     <bullet_item>Traditional—The users and roles will be created in the Workflow Manager (Classic) repository using ArcGIS Workflow Manager (Classic) Administrator. Users and roles can be imported from the Active Directory when this option is used. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将从中检索用户和角色的用户存储。可以从门户导入用户，并将其分配给在 Workflow Manager （Classic） 资料档案档案库中创建的角色。无法使用 ArcGIS Workflow Manager （Classic） 管理器编辑门户用户配置文件信息。可以使用传统选项在 Workflow Manager （Classic） 资料档案档案库中创建用户和角色。使用传统选项时，可以从 ArcGIS Workflow Manager （Classic） 管理器中的 Active Directory 导入用户和角色。</para>
        ///   <bulletList>
        ///     <bullet_item>门户 - 将从您当前登录的门户导入用户。</bullet_item><para/>
        ///     <bullet_item>传统 - 将使用 ArcGIS Workflow Manager （Classic） 管理器在 Workflow Manager （Classic） 资料档案档案库中创建用户和角色。使用此选项时，可以从 Active Directory 导入用户和角色。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("User Store")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _User_Store_value? _User_Store { get; set; } = null;

        public enum _User_Store_value
        {
            /// <summary>
            /// <para>Traditional</para>
            /// <para>Traditional—The users and roles will be created in the Workflow Manager (Classic) repository using ArcGIS Workflow Manager (Classic) Administrator. Users and roles can be imported from the Active Directory when this option is used. This is the default.</para>
            /// <para>传统 - 将使用 ArcGIS Workflow Manager （Classic） 管理器在 Workflow Manager （Classic） 资料档案档案库中创建用户和角色。使用此选项时，可以从 Active Directory 导入用户和角色。这是默认设置。</para>
            /// </summary>
            [Description("Traditional")]
            [GPEnumValue("TRADITIONAL")]
            _TRADITIONAL,

            /// <summary>
            /// <para>Portal</para>
            /// <para>Portal—The users will be imported from the portal you are currently signed in to.</para>
            /// <para>门户 - 将从您当前登录的门户导入用户。</para>
            /// </summary>
            [Description("Portal")]
            [GPEnumValue("PORTAL")]
            _PORTAL,

        }

        /// <summary>
        /// <para>Output Database Path (.jtc)</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Database Path (.jtc)")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _Output_DatabasePath { get; set; }


        public CreateWorkflowDatabase SetEnv(object configKeyword = null)
        {
            base.SetEnv(configKeyword: configKeyword);
            return this;
        }

    }

}